package com.lsh.oms.core.dao.other;

import com.lsh.oms.core.dao.MyBatisRepository;
import com.lsh.oms.core.model.order.OrderRoHead;
import com.lsh.oms.core.model.order.OrderSignHead;
import com.lsh.oms.core.service.tool.Criteria;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author peter
 */
@MyBatisRepository
public interface OrderRoHeadMapper {

    int deleteByPrimaryKey(Long id);

//    int insert(OrderRoHead record);

    int insertSelective(OrderRoHead record);

    OrderRoHead selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(OrderRoHead record);

    int updateByPrimaryKeyWithBLOBs(OrderRoHead record);

    int updateByPrimaryKey(OrderRoHead record);

    List<OrderRoHead> selectByOrderCode(Long orderCode);

    List<OrderRoHead> findBaseOnCriteria(@Param("criteria") Criteria criteria, @Param("start") long start, @Param("limit") long limit);

    Long countBaseOnCriteria(@Param("criteria") Criteria criteria);

    int updateByTmsId(OrderRoHead record);

    OrderRoHead selectByReturnOrderId(Long returnOrderId);

    int updateByReturnOrderId(OrderRoHead record);

    List<Long> selectByTimes(@Param("startTime") Integer startTime, @Param("endTime") Integer endTime);

    List<Long> findSpecifiedBetween(@Param("startTime") Integer startTime,
                                    @Param("endTime") Integer endTime,
                                    @Param("statuses") Set<Integer> statuses,
                                    @Param("types") Set<Integer> types);

    List<Long> selectByParams(@Param("fids") List<Long> fids);

    Map<String, Object> findReturnOrderById(@Param("return_order_id") Long returnOrderId);
}